Add DandersFrames as an anchor parent; inherit anchor visibility#135
Open
UnderGut wants to merge 2 commits intoDaleHuntGB:mainfrom
Open
Add DandersFrames as an anchor parent; inherit anchor visibility#135UnderGut wants to merge 2 commits intoDaleHuntGB:mainfrom
UnderGut wants to merge 2 commits intoDaleHuntGB:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds DandersFrames (CurseForge) as a selectable anchor parent in the custom viewer categories, so users can anchor BCDM bars (Custom / Additional Custom / Item / Items-Spells / Trinket) to their party/raid unit frames.
Changes
Core/Globals.luaAdded two anchor keys to the
BCDM.AnchorParentstable for the 5 custom viewer categories (Custom,AdditionalCustom,Item,Trinket,ItemSpell):DandersPartyHeader— the partySecureGroupHeaderTemplateframe (auto-sized to the visible party frames).DandersRaidFramesContainer— the raid container frame.Both frames are top-level globals created by DandersFrames, so they resolve through the existing
_G[Layout[2]]lookup with no additional load-order requirements. If DandersFrames isn't installed, the option is still shown but falls back toUIParent(see below).CustomViewers/*.lua(5 files)Two small robustness fixes applied uniformly to every
anchorParentresolution site:or UIParentfallback — if the saved anchor key refers to a frame that no longer exists (e.g. user disabled the anchor addon),_G[key]returnsnil; falling back toUIParentavoidsSetParent(nil)/SetPoint(..., nil, ...)errors.container:SetParent(anchorParent)added next to eachcontainer:SetPoint(..., anchorParent, ...)call for the 5 viewer containers (CustomCooldownViewer,AdditionalCustomCooldownViewer,CustomItemBar,CustomItemSpellBar,TrinketBar).Re-parenting makes the BCDM container inherit visibility from the anchor. This is necessary for DandersFrames (the raid container is hidden in party mode and vice-versa), and it also aligns behavior with other addons that hide their frames conditionally. Icons previously remained visible in their old position even when the anchor frame was hidden.
Testing
DandersFrames: Party Header/DandersFrames: Raid Containerand verified it tracks the frames and hides together with them when switching DandersFrames profiles between party and raid modes.UIParent,PlayerFrame,TargetFrame, other BCDM bars, ElvUI frames) still work unchanged.Notes
UIParent.